<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" errorPage="/pages/error.jsp"%>
	<jsp:useBean id="usuario" class="app.engine.solucoes.request.beans.Usuario" scope="session" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<script type="text/javascript" src="/javascript/script.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title><%=usuario.getNomeUsuario() != null ? usuario.getNomeUsuario() : "" %> - [Adicição de uma FAQ]</title>
</head>
<body>
<%
	if (usuario.getId() == null)
		response.sendRedirect("/");
%>
	<form name="menu" action="faqtool" method="post">
		<input type="hidden" name="cmd" value="">
		<input type="hidden" name="token" value="<%= request.getAttribute("token") %>">
		<table border="1" align="center">
			<tr>
				<td>
				<table bgcolor="tan" border="0" align="center" cellpadding="10"
					cellspacing="0">
					<tr>
						<th colspan="2">Adicionar FAQ</th>
					</tr>
					<tr>
						<td><b>Pergunta:</b></td>
						<td><input type="text" name="pergunta" size="46" value=""></td>
					</tr>
					<tr>
						<td><b>Resposta:</b></td>
						<td><textarea name="resposta" cols="35" rows="5"></textarea></td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="submit" value="Cancelar" onClick="document.menu.cmd.value='abort'"/>
							<input type="submit" value="Adicionar FAQ" onClick="document.menu.cmd.value='do-add'"/>
							<input type="submit" value="Sair" onClick="setCmd('exit')" />
						</td>
					</tr>
					<% if (request.getAttribute("faqtool.msg") != null) { %>
					<tr>
						<td colspan="2" bgcolor="white">
							<font size="-1" color="<%=request.getAttribute("corFonte") != null ? request.getAttribute("corFonte") : "black"%>">
								<i><%=request.getAttribute("faqtool.msg")%></i>
							</font>
						</td>
					</tr>
				<%} %>
				</table>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
